<template>
	<view>
		<z-paging ref="paging" v-model="couponList" @query="getCouponList" :default-page-size="limit" :empty-view-fixed="false">
			<v-tabs
				:scroll="false"
				color="#999"
				activeColor="#000"
				:lineScale="0.1"
				lineHeight="6rpx"
				lineColor="#000"
				v-model="current"
				:tabs="tabs"
				@change="changeTab"
				slot="top"
			></v-tabs>

			<view class="coupon-list">
				<view class="coupon-item" v-for="(item, index) in couponList">
					<image :src="$getImgUrl('mine/ic_yhq1.png')" mode="widthFix" class="img-coupon"></image>
					<!-- <image src="/static/ic_yhq2.png" mode="widthFix" class="img-coupon" v-if="current == 1"></image>
					<image src="/static/ic_yhq3.png" mode="widthFix" class="img-coupon" v-if="current == 2"></image> -->
					<view class="coupon-info-view flex-row-center">
						<view style="width: 150rpx; height: 100%;"></view>
						<view class="coupon-info">
							<view class="man">满{{ item.menkan }}元使用</view>
							<view class="name">{{ item.name }}</view>
							<view class="time">{{ $timestampToTime(item.starttime) }}-{{ $timestampToTime(item.endtime) }}</view>
						</view>

						<view class="coupon-rmb flex-col-center">
							<view class="rmb">RMB</view>
							<view class="money">{{ item.num }}</view>
							<view class="pingtai flex-center">平台专享优惠券</view>
						</view>
					</view>
				</view>
			</view>
		</z-paging>
	</view>
</template>

<script src="./coupon.js"></script>

<style lang="scss">
@import '@/style/common.scss';
@import './coupon.scss';
</style>
